<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>保卫钓鱼岛</title>
    <style type="text/css">
        /* 设置容器 */
        .con {
            width: 400px;
            height: 258px;
            position: relative;
            /* 图片居中 */
            margin: 0 auto;
        }

        .con:hover::before {
            content: "维护国家领土安全";
            border: black 50px solid;
            position: absolute;
            width: 100%;
            height: 100%;
            box-sizing: border-box;
            
            /* 调整文字 */
            text-align: center;
            color: red;
            font-size: 30px;
            border-image: url("./../lib/images/china.png") 50 50 50 50 round;
        }
    </style>
</head>
<body>
<div class="con"><img src="./../lib/images/fish.jpg" alt="钓鱼岛"></div>
</body>
</html>